package com.byapp.fast.amqp.enums;

import com.byapp.fast.common.enums.CodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

public class AmqpEnum {

    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public enum MessageTypeEnum implements CodeEnum<Integer> {

        MATCH_ODDS(2, "赛事赔率", "matchOdds"),
        MATCH_HANDICAP(8, "赛事盘口", "matchHandicap"),

        CALLBACK_PAY(101, "支付回调", "callBackPay"),
        CALLBACK_ETH(102, "区块回调", "callBackEth"),;

        private Integer code;
        private String msg;
        private String queueName;
    }


    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public enum CTypeEnum implements CodeEnum<Integer> {

        CALLBACK_ADD_MATCH(1, "添加赛事", "cbAddMatch"),
        CALLBACK_ADD_PLAY(2, "添加玩法", "cbAddPlay"),
        CALLBACK_CHANGE_ODDS(3, "变更赔率", "cbChangeOdds"),
        CALLBACK_CHANGE_HANDICAP(4, "变更封盘", "cbChangeHandicap"),
        CALLBACK_CHANGE_MATCH(5, "赛事改期", "cbChangeMatch"),
        CALLBACK_ADD_BAIL(6, "增加保证金", "cbAddBail"),
        CALLBACK_CANCEL_ORDER(7, "取消订单", "cbCancelOrder"),
        CALLBACK_CANCEL_MATCH(8, "取消赛事", "cbCancelMatch"),
        CALLBACK_LOT_MATCH(9, "赛事开奖", "cbLotMatch"),
        CALLBACK_PRIZE_MATCH(10, "赛事派奖", "cbPrizeMatch"),;

        private Integer code;
        private String msg;
        private String queueName;
    }


    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public enum ExchangeTypeEnum implements CodeEnum<Integer> {
        DIRECT_EXCHANGE(1, "直连交换机", "directExchange"),
        FANOUT_EXCHANGE(2, "扇形交换机", "fanoutExchange"),
        TOPIC_EXCHANGE(3, "主题交换机", "topicExchange"),
        HEADERS_EXCHANGE(4, "首部交换机", "headersExchange");

        private Integer code;
        private String msg;
        private String exchangeType;

    }


    @Getter
    @AllArgsConstructor
    @NoArgsConstructor
    public enum RoutingKeyEnum implements CodeEnum<Integer> {
        MATCH_ODDS_DIRECT(1, "赛事赔率key", "matchOdds"),
        MATCH_ODDS_TOPIC(2, "赛事赔率key", "matchOdds.*"),
        MATCH_HANDICAP_DIRECT(3, "赛事盘口key", "matchHandicap"),
        CALLBACK_PAY_DIRECT(4, "支付回调key", "callBackPay"),
        CALLBACK_ETH_DIRECT(5, "区块回调key", "callBackEth"),

        CB_ADD_MATCH_DIRECT(6, "添加赛事key", "cbAddMatch"),
        CB_ADD_PLAY_DIRECT(7, "添加玩法key", "cbAddPlay"),

        CB_CHANGE_ODDS_DIRECT(8, "变更赔率key", "cbChangeOdds"),
        CB_CHANGE_HANDICAP_DIRECT(9, "变更封盘key", "cbChangeHandicap"),
        CB_CHANGE_MATCH_DIRECT(10, "赛事改期key", "cbChangeMatch"),
        CB_ADD_BAIL_DIRECT(11, "增加保证金key", "cbAddBail"),
        CB_CANCEL_ORDER_DIRECT(12, "取消订单key", "cbCancelOrder"),
        CB_CANCEL_MATCH_DIRECT(13, "取消赛事key", "cbCancelMatch"),

        CB_LOT_MATCH_DIRECT(14, "赛事开奖key", "cbLotMatch"),
        CB_PRIZE_MATCH_DIRECT(15, "赛事派奖key", "cbPrizeMatch"),;

        private Integer code;
        private String msg;
        private String routingKey;
    }


}
